package guoanmaker.operator.business.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.OperatorFinancingServiceNew;

public interface OperatorFinancingServiceNewRepository extends JpaRepository<OperatorFinancingServiceNew, String>, JpaSpecificationExecutor<OperatorFinancingServiceNew> {
	@Modifying
	@Query(value = "delete from t_operator_financing_service_new where citycode=:cityCode", nativeQuery = true)
	public List<OperatorFinancingServiceNew> deleteFinancingServiceNewByCityCode(@Param("cityCode") String cityCode);
	@Query("select f from OperatorFinancingServiceNew f where f.citycode=:cityCode")
	public List<OperatorFinancingServiceNew> findFinancingServiceNewByCityCode(@Param("cityCode") String cityCode);
	
	public List<OperatorFinancingServiceNew> findByCitycodeAndFinancingName(@Param("citycode") String citycode,@Param("financingName") String financingName);

}
